Merged
Conversation
6b9cfa2 to
8e9f654
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
fix #149 build-config 添加配置
resolve.alias,详情如下:resolve类型:
object对于模块解析行为的配置,在扩展时会合并原值。
resolve的字段描述如下:resolve.alias类型:
object配置别名以控制对特定模块或路径的解析行为;如配置
{ "foo": "src/foo" },则模块foo会被解析到<项目根目录>/src/foo,模块foo/bar会被解析到<项目根目录>/src/foo/barresolve.alias的字段描述如下:resolve.alias.(.*)类型:
string解析目标的路径(相对于项目根目录),如
"src/foo"。场景
常见的场景有:
{ "@": "src" }来实现@到源代码目录的映射,如@/constants/foo会被解析到<BUILD_ROOT>/src/constants/fooportal-base)中的开发预览项目可以通过配置{ "portal-base": ".." }来引用 lib 本身的内容,见 https://github.com/qbox/portal-base/pull/647{ "crypto": "crypto-browserify" }的配置来实现之,详见 Node.js core modules polyfill #151 (comment)